/**
 * @description 定义业务路由
 */
import store from '@/store'
// import Home from '../views/home'
// const Home=()=>import(/** webpackChunkName: 'Home' */'../views/home')
// const SupplierEdit=()=>import(/** webpackChunkName: 'Home' */'../views/purchase/supplier/edit.vue')

// const arr=[
//     {path:'/home'},
//     {path:'/purchase/supplier/edit'},
// ]
let menuList=store.getters['common/menuList'].filter(it=>!!it.path)
let routes=menuList.map(it=>{
    return {path:it.path,component:(()=>import('../views'+it.path))}
})
// const routes = [
//     {path: '/home', component: Home},
//     {path: '/purchase/supplier/edit', component: SupplierEdit},
// ]
// const routes = [
//     {path: '/home', component: (()=>import('../views/home'))},
//     {path: '/purchase/supplier/edit', component: (()=>import('../views/purchase/supplier/edit.vue'))},
// ]

export default routes